package com.llkj.qingnianguoxue.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.bean.CourseTeacherBean;
import com.llkj.qingnianguoxue.util.ImageLoadingUtil;

import java.util.List;

/**
 * 一对一推荐导师列表适配器
 */
public class CourseTearcherListAdapter extends BaseQuickAdapter<CourseTeacherBean, BaseViewHolder> {

    public CourseTearcherListAdapter(int layoutResId, List<CourseTeacherBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, CourseTeacherBean item) {
        baseViewHolder.setText(R.id.tv_title, item.getName());
        ImageView ivPic = baseViewHolder.getView(R.id.iv_pic);
        ImageLoadingUtil.loadImgGlideRoundCenterCrop(ivPic,item.getImg());

        baseViewHolder.setText(R.id.tv_description, item.getAbstractX());
    }

}
